<template>
  <div>
    <table class="owntable table1 tableLayout mb20" border="0" cellspacing="0" cellpadding="1" width="100%">
      <tr>
        <td width="150">采购管理编号</td>
        <td>{{ item.number }}</td>
        <td width="150">采购类别</td>
        <td>{{ purchaseList[item.purchaseType] }}</td>
      </tr>
      <tr>
        <td>原材料批号</td>
        <td>{{ item.materialNumber ||'-' }}</td>
        <td>采购日期</td>
        <td>{{ item.purchaseDate }}</td>
      </tr>
      <tr>
        <td>管理部门</td>
        <td>{{ item.manageDeptName }}</td>
        <td>负责人</td>
        <td>{{ item.manageUserName }}</td>
      </tr>
      <tr>
        <td>编制部门</td>
        <td colspan="3">{{ item.createDeptName }}</td>
      </tr>
    </table>
      <div class="mb20">{{item.purchaseType == 0?'原材料信息如下:':item.purchaseType == 1?'设备信息如下:':item.purchaseType == 2?'外包服务信息如下:':'计算机应用软件信息如下:'}}</div>
      <table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-for="(v, i) in item.cailiaoList" :key="i" v-if="item.purchaseType == 0">
        <tr>
          <td width="150">序号</td>
          <td>{{ i + 1 }}</td>
          <td width="150">原材料名称</td>
          <td>{{ v.cailiaoName }}</td>
        </tr>
        <tr>
          <td>原材料规格型号</td>
          <td>{{ v.cailiaoSku }}</td>
          <td>原材料编号</td>
          <td>{{ v.cailiaoNumber }}</td>
        </tr>
        <tr>
          <td>数量</td>
          <td>{{ v.cailiaoQty }}</td>
          <td>供应商名称</td>
          <td>{{ v.supplierName }}</td>
        </tr>
      </table>
      <table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-for="(v, i) in item.deviceList" :key="i" v-if="item.purchaseType == 1">
        <tr>
          <td width="150">设备名称</td>
          <td>{{ v.deviceName }}</td>
          <td width="150">设备型号</td>
          <td>{{ v.deviceModel }}</td>
        </tr>
        <tr>
          <td>采购数量</td>
          <td>{{ v.qty }}{{v.unit}}</td>
          <td>供应商名称</td>
          <td>{{ v.supplierName }}</td>
        </tr>
      </table>
      <table class="table1 owntable mb20 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-for="(v, i) in item.outsourcingList" :key="i" v-if="item.purchaseType == 2">
        <tr>
          <td width="150">外包服务名称</td>
          <td colspan="3">{{ v.outsourcingName }}</td>
        </tr>
        <tr>
          <td width="150">供应商名称</td>
          <td colspan="3">{{ v.supplierName }}</td>
        </tr>
        <tr>
          <td width="150">采购数量</td>
          <td colspan="3">{{ v.qty }}{{v.unit}}</td>
        </tr>
      </table>
      <table class="table1 owntable mb10 tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%" v-for="(v, i) in item.softwareList" :key="i" v-if="item.purchaseType == 3">
        <tr>
          <td width="150">计算机应用软件名称</td>
          <td colspan="3">{{ v.softwareName }}</td>
        </tr>
        <tr>
          <td width="150">供应商名称</td>
          <td colspan="3">{{ v.supplierName }}</td>
        </tr>
        <tr>
          <td width="150">计算机应用软件版本</td>
          <td>{{ v.softwareVersion }}</td>
          <td width="150">采购数量</td>
          <td>{{ v.qty }}{{v.unit}}</td>
        </tr>
      </table>
  </div>
</template>

<script>
export default {
  props: {
    item: {}
  }
};
</script>

<style></style>
